{extend name="base:base" /}
{block name="body"}

<div class="layui-container fly-marginTop">
    <div class="fly-panel fly-panel-user" pad20>
        <div class="layui-tab layui-tab-brief" lay-filter="user">
            <ul class="layui-tab-title">
                <li><a href="login.html">登入</a></li>
                <li class="layui-this">找回密码<!--重置密码--></li>
            </ul>
            <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
                <div class="layui-tab-item layui-show">
                    <!-- 重置密码 -->
                    
                    <?php 
                    if(request()->get('token')){
                    ?>
                    <div class="fly-msg"><?php echo $nickname; ?>，请重置您的密码，请在5分钟内完成密码重设</div>
                    <div class="layui-form layui-form-pane"  style="margin-top: 30px;">
                        <form action="<?php echo url('everyone/repass'); ?>" method="post">
                        <div class="layui-form-item">
                          <label for="L_pass" class="layui-form-label">密码</label>
                          <div class="layui-input-inline">
                            <input type="password" id="L_pass" name="pass" required lay-verify="pass" autocomplete="off" class="layui-input">
                          </div>
                          <div class="layui-form-mid layui-word-aux">6到16个字符</div>
                        </div>
                        <div class="layui-form-item">
                          <label for="L_repass" class="layui-form-label">确认密码</label>
                          <div class="layui-input-inline">
                            <input type="password" id="L_repass" name="repass" required lay-verify="pass" autocomplete="off" class="layui-input">
                          </div>
                        </div>
                        <div class="layui-form-item">
                          <label for="L_imagecode" class="layui-form-label">图形码</label>
                          <div class="layui-input-inline">
                            <input type="text" id="L_imagecode" name="imagecode" required lay-verify="required" placeholder="输入图形中的数字" autocomplete="off" class="layui-input">
                          </div>
                          <div class="layui-form-mid" style="padding: 0!important;">
                                    <img src="{:captcha_src()}" alt="验证码，点击图片可更换" style="cursor: pointer" onclick="this.src='{:captcha_src()}?r='+Math.random() " />
                          </div>                          
                        </div>
                        <div class="layui-form-item">
                          <input type="hidden" name="token" value="{$token}">
                          <input type="hidden" name="email" value="{$email}">
                          <button class="layui-btn" alert="1" lay-filter="*" lay-submit>提交</button>
                        </div>
                      </form>
                    </div>         
                    <?php }else{ ?>
                 

                    <div class="layui-form layui-form-pane">
                        <form method="post">
                            
                            
                            <div class="layui-form-item">
                                <label for="L_email" class="layui-form-label">邮箱</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="L_email" name="email" required lay-verify="required|email" autocomplete="off" class="layui-input">
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="L_imagecode" class="layui-form-label">图形码</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="L_imagecode" name="imagecode" required lay-verify="required" placeholder="输入图形中的数字" autocomplete="off" class="layui-input">
                                </div>
                                <div class="layui-form-mid" style="padding: 0!important;">
                                    <img src="{:captcha_src()}" alt="验证码，点击图片可更换" style="cursor: pointer" onclick="this.src='{:captcha_src()}?r='+Math.random() " />
                                </div>
                            </div>
                            <div class="layui-form-item">
                                <label for="L_email" class="layui-form-label">验证码</label>
                                <div class="layui-input-inline">
                                    <input type="text" id="L_vercode" name="vercode" required lay-verify="required" placeholder="输入邮箱收到的验证码" autocomplete="off" class="layui-input">
                                 </div>
                                <div class="layui-form-mid" style="padding: 0!important;"> <button type="button" class="layui-btn layui-btn-normal" id="FLY-getvercode">获取验证码</button> </div>                               
                            </div>  
                            
                            
                            
                            <div class="layui-form-item">
                                <button class="layui-btn" alert="1" lay-filter="myform" lay-submit>提交</button>
                            </div>
                        </form>
                    </div>
                    <?php } ?>
                    

                </div>
            </div>
        </div>
    </div>
</div>


{/block}